package a.h;

import javax.swing.*;
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.event.*;
import java.util.Map;

abstract class i
  extends h
{
  a_ q;
  
  i(ec paramec, Map paramMap, JTextComponent paramJTextComponent)
  {
    super(paramec, paramMap, paramJTextComponent);
  }
  
  void a(ec paramec, Map paramMap)
  {
    this.q = new a_(this.p);
    this.p.addKeyListener(new KeyAdapter()
    {
      public void keyPressed(KeyEvent paramAnonymousKeyEvent)
      {
        if ((ec.t != 0) || ((10 == paramAnonymousKeyEvent.getKeyCode()) && (0 == paramAnonymousKeyEvent.getModifiers()))) {
          i.this.h();
        }
      }
    });
  }
  
  public JComponent f()
  {
    return this.q;
  }
  
  protected void h()
  {
    a(this.p.getText(), true);
  }
  
  public void c(boolean paramBoolean)
  {
    boolean bool = this.p.isEnabled();
    if (ec.t == 0)
    {
      if (bool != paramBoolean) {
        this.q.setEnabled(paramBoolean);
      }
    }
    else {
      a(bool, paramBoolean);
    }
  }
  
  Color e(boolean paramBoolean)
  {
    return paramBoolean ? ad.a("TextField.background") : ad.a("TextField.inactiveBackground");
  }
  
  private static final class b_
    extends MouseAdapter
  {
    private final ActionListener a;
    
    b_(ActionListener paramActionListener)
    {
      this.a = paramActionListener;
    }
    
    public void mouseClicked(MouseEvent paramMouseEvent)
    {
      int j = ec.t;
      int i = 0;
      AWTEvent localAWTEvent = EventQueue.getCurrentEvent();
      if (j == 0) {
        if ((localAWTEvent instanceof InputEvent))
        {
          i = ((InputEvent)localAWTEvent).getModifiers();
          if (j != 0) {
            return;
          }
          if (!ec.s) {
            break label62;
          }
        }
      }
      if ((j != 0) || ((localAWTEvent instanceof ActionEvent))) {
        i = ((ActionEvent)localAWTEvent).getModifiers();
      }
      label62:
      this.a.actionPerformed(new ActionEvent(paramMouseEvent.getSource(), 1001, null, EventQueue.getMostRecentEventTime(), i));
    }
  }
  
  static class a_
    extends JPanel
  {
    a_(JComponent paramJComponent)
    {
      super();
      add(paramJComponent, "Center");
      add(a(-1, paramJComponent.getPreferredSize().height), "East");
      setOpaque(false);
    }
    
    public void setEnabled(boolean paramBoolean)
    {
      int k = ec.t;
      boolean bool = ec.s;
      super.setEnabled(paramBoolean);
      int i = 0;
      do
      {
        int j = getComponentCount();
        while (!bool)
        {
          if (i >= j) {
            break;
          }
          getComponent(i).setEnabled(paramBoolean);
          i++;
        }
      } while (k != 0);
    }
    
    protected AbstractButton a(int paramInt1, int paramInt2)
    {
      int k = ec.t;
      JButton localJButton = new JButton("...");
      if (k == 0)
      {
        localJButton.setMargin(new Insets(0, 0, 0, 0));
        if ((paramInt1 <= -1) && (paramInt2 <= -1)) {}
      }
      else
      {
        Dimension localDimension = localJButton.getPreferredSize();
        if (k == 0) {}
        int i = paramInt1 > -1 ? paramInt1 : localDimension.width;
        if (k == 0) {}
        int j = paramInt2 > -1 ? paramInt2 : localDimension.height;
        localJButton.setPreferredSize(new Dimension(i, j));
      }
      return localJButton;
    }
    
    void a(ActionListener paramActionListener)
    {
      int i = ec.t;
      if ((i != 0) || (getComponentCount() > 1))
      {
        Component localComponent = getComponent(1);
        if (i == 0) {
          if ((localComponent instanceof AbstractButton))
          {
            if (i != 0) {
              break label52;
            }
            ((AbstractButton)localComponent).addActionListener(paramActionListener);
            if (!ec.s) {
              return;
            }
          }
        }
        label52:
        localComponent.addMouseListener(new i.b_(paramActionListener));
      }
    }
    
    AbstractButton a()
    {
      return (AbstractButton)getComponent(1);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.i

 * JD-Core Version:    0.7.0.1

 */